#pragma once

#include <GL/gl.h>
#include <GL/glu.h>

class slLight
{
public:
	slLight();
	~slLight();
	
	void Init(int light);
	void SetLight (int light);
	void SetValues();
   void TurnOn();              // Turns on light
   void TurnOff();             // Turns off light
   void Toggle();              // Toggles light on or off
   bool GetOnOffState();       // Returns current on/off state
   void SetAmbientColor ( float r, float g, float b, float a );
   void SetDiffuseColor ( float r, float g, float b, float a );
   void SetPosition( float x, float y, float z, float w );
   void SetSpecular(float r, float g, float b, float a );

   /* Spot */
   void SetSpotDirection ( float x, float y, float z );
   void SetSpotExponent ( float exponent );
   void SetSpotCutoff ( float cutoff );

   /* Attenuation */
   void SetConstantAtt ( float constant );
   void SetLinearAtt ( float linear );
   void SetQuadraticAtt ( float quadratic );

   void draw();

private:
  	int _light;
  	float ambient[4];
  	float diffuse[4];
  	float specular[4];
  	float position[4];
  	float spot_direction[3];
  	float spot_exponent;
  	float spot_cutoff;
  	float constant_attenuation;
  	float linear_attenuation;
  	float quadratic_attenuation;
  	bool state;
};